package com.karst87.study.dowithbytes.chapter01
{
	import flash.display.Sprite;
	
	import org.aswing.Container;
	import org.aswing.FlowLayout;
	import org.aswing.JPanel;

	public class Chapter01 extends JPanel
	{
		public function Chapter01()
		{
			createBitStudy() ;
			createBitwiseOperators() ;
		}

		private var bitStudy : ByteStudy = null ;
		private function createBitStudy() : void
		{
			if( bitStudy == null )
				bitStudy = new ByteStudy() ;
			bitStudy.setLocationXY( 10, 10 ) ;
			append( bitStudy ) ;
		}

		private var bitwiseOperators : BitwiseOperators = null ;
		private function createBitwiseOperators() : void
		{
			if( bitwiseOperators == null )
				bitwiseOperators = new BitwiseOperators() ;
			bitwiseOperators.setLocationXY( 10, 100 ) ;
			append( bitwiseOperators ) ;
		}
		
		override public function setSizeWH(w:int, h:int):void
		{
			super.setSizeWH( w, h ) ;
			bitStudy.setSizeWH( w, 100 ) ;
			bitwiseOperators.setSizeWH( w, 100 ) ;
		}
	}
}